<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<input type="file" name="" id="file">
	<img src="" alt="" id="bigImg">
	<script>
		window.onload=function(){
			var file = document.querySelector("#file");
			var bigImg = document.querySelector("#bigImg");
			file.onchange=function(){
				var reader = new FileReader();
				reader.readAsDataURL(file.files[0]);
				reader.onload=function(){
					bigImg.src=this.result;
				}
			}
		}
	</script>
</body>
</html>
